<HTML><HEAD><TITLE>bag_abolish(+BagHandle)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Non-logical Variables, Arrays, Bags, Shelves and Stores</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>bag_abolish(+BagHandle)</H1>
Destroy a bag explicitly
<DL>
<DT><EM>BagHandle</EM></DT>
<DD>A bag handle
</DD>
</DL>
<H2>Description</H2>
	This explicitly destroys a previously created bag object and
	frees all its memory.  Invoking bag_abolish/1 is optional,
	the bag will be automatically destroyed when the system
	backtracks across the call to bag_create/1, or when the
	BagHandle is no longer needed and gets garbage collected.
	bag_dissolve/2 will also destroy the bag.
<P>
	Using the BagHandle after it has been destroyed will lead
	to an error message. Destroying an already destroyed bag
	does nothing and is silently accepted.
    
<H3>Modes and Determinism</H3><UL>
<LI>bag_abolish(+) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>BagHandle is not instantiated
<DT><EM>(5) type error </EM>
<DD>BagHandle is not a bag
<DT><EM>(40) stale object handle </EM>
<DD>BagHandle refers to an already destroyed bag
</DL>
<H2>See Also</H2>
<A HREF="../../kernel/storage/bag_create-1.html">bag_create / 1</A>, <A HREF="../../kernel/storage/bag_enter-2.html">bag_enter / 2</A>, <A HREF="../../kernel/storage/bag_count-2.html">bag_count / 2</A>, <A HREF="../../kernel/storage/bag_erase-1.html">bag_erase / 1</A>, <A HREF="../../kernel/storage/bag_retrieve-2.html">bag_retrieve / 2</A>, <A HREF="../../kernel/storage/bag_dissolve-2.html">bag_dissolve / 2</A>
</BODY></HTML>
